home *** CD-ROM | disk | FTP | other *** search
/ Revista do CD-ROM 101 / CD-ROM 101.iso / compl / maya5ple / Install_MayaPLE5_English.exe / Maya / Data1.cab / manipRotateValues.mel < prev    next >
Encoding:
Text File  |  2003-07-17  |  2.4 KB  |  76 lines

  1. // Copyright (C) 1997-2002 Alias|Wavefront,
  2. // a division of Silicon Graphics Limited.
  3. //
  4. // The information in this file is provided for the exclusive use of the
  5. // licensees of Alias|Wavefront.  Such users have the right to use, modify,
  6. // and incorporate this code into other products for purposes authorized
  7. // by the Alias|Wavefront license agreement, without fee.
  8. //
  9. // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  10. // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  11. // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  12. // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  13. // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  14. // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  15. // PERFORMANCE OF THIS SOFTWARE.
  16. //
  17.  
  18. global proc manipRotateValues ( string $toolName ) {
  19.  
  20.     string $parent = (`toolPropertyWindow -q -location` + "|manipRotate");
  21.     setParent $parent;
  22.  
  23.     // Initialize settings
  24.     //
  25.  
  26.     int $manipMode = `manipRotateContext -q -mode $toolName`;
  27.     switch ($manipMode)
  28.     {
  29.         case 0:
  30.              radioButtonGrp -e -sl 1 manipModeRadio;
  31.              $manipMode = 1;
  32.         break;
  33.         case 1:
  34.             radioButtonGrp -e -sl 2  manipModeRadio;
  35.              $manipMode = 2;
  36.         break;
  37.         case 2:
  38.             radioButtonGrp -e -sl 3 manipModeRadio;
  39.              $manipMode = 3;
  40.         break;
  41.     }
  42.  
  43.     radioButtonGrp -e
  44.         -nrb 2
  45.         -on1 ("manipRotateContext -e -mode 0 " + $toolName)
  46.         -on2 ("manipRotateContext -e -mode 1 " + $toolName)
  47.         -on3 ("manipRotateContext -e -mode 2 " + $toolName)
  48.         -select $manipMode
  49.         manipModeRadio;
  50.  
  51.     int    $isSnap  = `manipRotateContext -q -snap $toolName`;
  52.     int    $isRelative = `manipRotateContext -q -snapRelative $toolName`;
  53.     float  $snapVal = `manipRotateContext -q -snapValue $toolName`;
  54.  
  55.     checkBoxGrp -e -v1 $isSnap manipRotateSnapCheck;
  56.     checkBoxGrp -e -enable $isSnap -v1 $isRelative manipRotateSnapRelative;
  57.     floatFieldGrp -e -enable $isSnap -v1 $snapVal manipRotateSnapValue;
  58.  
  59.     checkBoxGrp -e 
  60.         -cc1 ("manipRotateContext -e -snap #1 " + $toolName)
  61.         manipRotateSnapCheck;
  62.  
  63.     checkBoxGrp -e 
  64.         -cc1 ("manipRotateContext -e -snapRelative #1 " + $toolName)
  65.         manipRotateSnapRelative;
  66.  
  67.     floatFieldGrp -e 
  68.         -cc ("manipRotateContext -e -snapValue #1" + " " + $toolName )
  69.         manipRotateSnapValue;
  70.  
  71.  
  72.     string $helpTag = "RotateTool";
  73.     toolPropertySetCommon $toolName "manipRotate.xpm" $helpTag;
  74.     toolPropertySelect "manipRotate";
  75. }
  76.